package edu.sctu.zhengsenwen.month201506.day20150628.game;

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

/**
 * Created by user15 on 2015/6/28.
 */
public class BaseFrame extends Frame {

    private static final long serialVersionUID = -8342342546611528706L;


    public void launchFrame(){

        setSize(Constant.GAME_WIDTH, Constant.GAME_HEIGHT);
        setLocation(200,200);
        setVisible(true);

        new Thread(new PaintThread()).start();


        addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });

    }
}
